from django.shortcuts import render

# Create your views here.
from rest_framework.generics import ListAPIView, RetrieveAPIView

from activity.models import Activity
from activity.serializers import ActivitiesSerializer
# from code_cloud_confluence.code_monkey.code_monkey.utils.pagination import StandardResultsSetPagination
from complains.utils.pagination import StandardResultsSetPagination


class ActivityAPIView(ListAPIView):
    queryset = Activity.objects.all().order_by('-start_time')
    serializer_class = ActivitiesSerializer
    pagination_class = StandardResultsSetPagination


class ActivityDetailAPIView(RetrieveAPIView):
    queryset = Activity.objects.all()
    serializer_class = ActivitiesSerializer
    pagination_class = StandardResultsSetPagination